package com.eorchis.module.classnotice.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;



import org.hibernate.annotations.GenericGenerator;

import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.module.trainingclass.domain.TrainingClass;

/**
 * Title: ClassNotice<br>
 * Description: 入学通知实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author Max
 * @createDate 2014-12-12
 * @version $Revision$
 */
@Entity
@Table(name = "TRAINING_NOTICE")
public class ClassNotice implements IBaseEntity {
	private static final long serialVersionUID = 1L;

	private String noticeId;//ID
	private String attachmentId;//附件ID
	//private String classId;//培训班ID
	private TrainingClass trainingClass;//培训班ID
	
	/**
	 * 获取ID
	 */	
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="NOTICE_ID")
	public String getNoticeId() {
		return noticeId;
	}
	/**
	 * 设置ID
	 */		
	public void setNoticeId(String noticeId) {
		this.noticeId = noticeId;
	}
	/**
	 * 获取ID
	 */	
	@Column(name="ATTACHMENT_ID")
	public String getAttachmentId() {
		return attachmentId;
	}
	/**
	 * 设置ID
	 */		
	public void setAttachmentId(String attachmentId) {
		this.attachmentId = attachmentId;
	}
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="CLASS_ID",referencedColumnName = "CLASS_ID" )
	public TrainingClass getTrainingClass() {
		return trainingClass;
	}
	public void setTrainingClass(TrainingClass trainingClass) {
		this.trainingClass = trainingClass;
	}
}
